package dados;

import org.junit.*;


public class ContatoTest {
	@Test public void testaConstrutor(){
		@SuppressWarnings("unused")
		Contato c1 = null;
		try {
			c1 = new Contato(" ","andre@hotmail.com","Rua errrrmm");
		} catch (Exception e) {
			Assert.assertEquals("Exception Errada", "Nome Invalido.",e.getMessage());
		}
		try {
			c1 = new Contato("Tiaraju","andre@hotmail","Rua ermmm");
		} catch (Exception e) {
			Assert.assertEquals("Exception Errada", "Email Invalido.",e.getMessage());
		}

		try {
			c1 = new Contato("Tiaraju","andre@hotmail.com","Rua ermmm","22/1");
		} catch (Exception e) {
			Assert.assertEquals("Exception Errada", "Data de Aniversario Invalida.",e.getMessage());
		}
		try {
			c1 = new Contato("Tiaraju","andre@hotmail.com","Rua ermmm","22/10");
		} catch (Exception e) {
			Assert.fail();
		}
		
	}

}
